]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Use TOPBAR_POPUP action mode for all menus
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 23 Feb 2015 19:07:04 +0000 (20:07 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 23 Feb 2015 20:39:22 +0000 (21:39 +0100)
When it comes to keybindings or gestures, there's not really a good
reason why popups associated with the top bar should behave differently
from any other shell menus. Just set the action mode generically for
all menus, so actions like screenshots or media-keys start working
with menus like the background- or app launcher context menus.

https://bugzilla.gnome.org/show_bug.cgi?id=745039

js/ui/panel.js
js/ui/popupMenu.js
src/shell-action-modes.h

index 6e4fee3eaf7c0921968b820190a44700cdb4402b..c1ca129750ebe8a8eaedfe1cd1fc92c89540c4c6 100644 (file)
@@ -723,7 +723,7 @@ const Panel = new Lang.Class({
 
         this.statusArea = {};
 
-        this.menuManager = new PopupMenu.PopupMenuManager(this, { actionMode: Shell.ActionMode.TOPBAR_POPUP });
+        this.menuManager = new PopupMenu.PopupMenuManager(this);
 
         this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
         this.actor.add_actor(this._leftBox);
index ffa78e5ce46881950e2cdd7fda1763b95cf97ade..d4bb2aca71b60684be68313a1ce74004ba6f3b3c 100644 (file)
@@ -1159,6 +1159,8 @@ const PopupMenuManager = new Lang.Class({
     Name: 'PopupMenuManager',
 
     _init: function(owner, grabParams) {
+        grabParams = Params.parse(grabParams,
+                                  { actionMode: Shell.ActionMode.POPUP });
         this._owner = owner;
         this._grabHelper = new GrabHelper.GrabHelper(owner.actor, grabParams);
         this._menus = [];
index cff1d12ac6005bdf4e55b9e7e0e77b166b964682..bf21d341c374c3d9f3c812a67086fe34357c62c5 100644 (file)
@@ -15,8 +15,7 @@
  * @SHELL_ACTION_MODE_SYSTEM_MODAL: allow action when a system modal
  *     dialog (e.g. authentification or session dialogs) is open
  * @SHELL_ACTION_MODE_LOOKING_GLASS: allow action in looking glass
- * @SHELL_ACTION_MODE_TOPBAR_POPUP: allow action while a top bar menu
- *     is open
+ * @SHELL_ACTION_MODE_POPUP: allow action while a shell menu is open
  * @SHELL_ACTION_MODE_ALL: always allow action
  *
  * Controls in which GNOME Shell states an action (like keybindings and gestures)
@@ -32,7 +31,7 @@ typedef enum {
   SHELL_ACTION_MODE_MESSAGE_TRAY  = 1 << 5,
   SHELL_ACTION_MODE_SYSTEM_MODAL  = 1 << 6,
   SHELL_ACTION_MODE_LOOKING_GLASS = 1 << 7,
-  SHELL_ACTION_MODE_TOPBAR_POPUP  = 1 << 8,
+  SHELL_ACTION_MODE_POPUP         = 1 << 8,
 
   SHELL_ACTION_MODE_ALL = ~0,
 } ShellActionMode;